<template>
	<view class="box bg-f7">
		<view class="bg-white padding-b-30">
			<view class="img-box">
				<image :src="info.image" mode="widthFix"></image>
			</view>
			<view class="padding-l-r-30 bg-white " >
				<view class="fs-32 color-0 fw-b title-box">{{info.title}}</view>
				<view class="color-43 fs-24">
					{{info.cate_name}} | {{info.cate_pid_name}}
				</view>
			</view>
		</view>
		<view class="bg-white margin-t-20">
			<view class="padding-30">
				<view class="fs-32 fw-b color-0">
					简介
				</view>
                <view v-if="info.video_file" class="margin-t-20">
                    <video style="width: 100%;" :src="info.video_file" controls="true" autoplay></video>
                </view>
                <view class="margin-t-20">
                    <u-parse :content="info.content"></u-parse>
                </view>
			</view>
		</view>
	</view>
</template>

<script>
import {
    publicityDetail,
    publicitySign
} from "@/api/culturalPropaganda"
	export default {
		data(){
			return{
				info:{ },
                id:''
			}
		},
		onLoad(e){
            this.id = e.id
            this.initInfo()
            console.log(this.id)
		},
		methods:{
            initInfo() {
                publicityDetail({
                    publicity_id: this.id
                }).then(res => {
                    if (res.code == 1) {
                        this.info = res.data
                    } else {
                        uni.showToast({
                            icon: 'none',
                            title: res.msg
                        })
                    }
                })
            },
        },
	}
</script>

<style lang="scss" scoped>
	.img-box {
		imag {
			width: 100%;
		}
	}
	.title-box {
		line-height: 88rpx;
	}
</style>